﻿using Demo.WebApi.Models.Users;
using Demo.WebApi.Repository;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;

namespace Demo.WebApi.Services
{
    [Dependency(ServiceLifetime.Singleton)]

    public class UserService : IUserService
    {
        public IUserRepository  UserRepository { get; set; }
        public void AddUser(User User)
        {           
            UserRepository.Insert(User);
        }

        public void DeletedUser(User User)
        {
             UserRepository.Delete(User);
        }

        public List<User> SelectdUser(User User)
        {
            return UserRepository.Select(User);
        }

        public void UpdatedUser(User User)
        {
           UserRepository.Update(User);
        }
    }
}
